/**
 * All right reserved@Raygo 2022~2030
 */

package com.raygo.runner.core.data;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

/**
 * 组执行结果
 *
 * @author Raygo
 * @since 2022年5月26日
 */
public class GroupResult {
    /**
     * 唯一ID
     */
    private String uuid;

    /**
     * 名称描述
     */
    private String name;

    /**
     * 开始时间
     */
    private String beginTime;

    /**
     * 结束时间
     */
    private String endTime;

    /**
     * 执行结果，0成功，1失败，2停止，3其他
     */
    private int result;

    /**
     * 各组执行结果
     */
    private List<StepResult> groupResults = new ArrayList<>();

    /**
     * 扩展字段1
     */
    private String extend1;

    /**
     * 扩展字段21
     */
    private String extend2;

    /**
     * 扩展字段3
     */
    private String extend3;

    /**
     * 构造
     */
    public GroupResult() {
        this.uuid = UUID.randomUUID().toString();
    }

    /**
     * 构造
     *
     * @param groupName 名称
     */
    public GroupResult(String groupName) {
        this.name = groupName;
        this.uuid = UUID.randomUUID().toString();
    }

    /**
     * Get uuid value
     *
     * @return the uuid
     */
    public String getUuid() {
        return uuid;
    }

    /**
     * Get name value
     *
     * @return the desc
     */
    public String getName() {
        return name;
    }

    /**
     * Set name
     *
     * @param desc the desc to set
     */
    public void setName(String desc) {
        this.name = desc;
    }

    /**
     * Get beginTime value
     *
     * @return the beginTime
     */
    public String getBeginTime() {
        return beginTime;
    }

    /**
     * Set beginTime to beginTime
     *
     * @param beginTime the beginTime to set
     */
    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    /**
     * Get endTime value
     *
     * @return the endTime
     */
    public String getEndTime() {
        return endTime;
    }

    /**
     * Set endTime to endTime
     *
     * @param endTime the endTime to set
     */
    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    /**
     * Get result value
     *
     * @return the result
     */
    public int getResult() {
        return result;
    }

    /**
     * Set result to result
     *
     * @param result the result to set
     */
    public void setResult(int result) {
        this.result = result;
    }

    /**
     * Get step Result list
     *
     * @return the step Results
     */
    public List<StepResult> getStepResults() {
        return groupResults;
    }

    /**
     * Set step result list
     *
     * @param step Results
     */
    public void setStepResults(List<StepResult> groupResults) {
        this.groupResults = groupResults;
    }

    /**
     * Get extend1 value
     *
     * @return the extend1
     */
    public String getExtend1() {
        return extend1;
    }

    /**
     * Set extend1 to extend1
     *
     * @param extend1 the extend1 to set
     */
    public void setExtend1(String extend1) {
        this.extend1 = extend1;
    }

    /**
     * Get extend2 value
     *
     * @return the extend2
     */
    public String getExtend2() {
        return extend2;
    }

    /**
     * Set extend2 to extend2
     *
     * @param extend2 the extend2 to set
     */
    public void setExtend2(String extend2) {
        this.extend2 = extend2;
    }

    /**
     * Get extend3 value
     *
     * @return the extend3
     */
    public String getExtend3() {
        return extend3;
    }

    /**
     * Set extend3 to extend3
     *
     * @param extend3 the extend3 to set
     */
    public void setExtend3(String extend3) {
        this.extend3 = extend3;
    }
}
